<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function max() {
            const num = Array.prototype.slice.call(arguments);//变为类数组
            let max = num[0];
            nums.forEach(n => {
                if (n > max) {
                    max = n;
                }
            })
            return max;
        }

        // 方法2
        Math.max(10, 20);
    </script>
</body>

</html>